package com.ff.xyh.feign.client.message;

import com.ff.xyh.common.entity.message.RoomBanned;
import com.ff.xyh.common.entity.result.ResultObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


/**
 * @Auther FF
 * @Date 2022年 11月 29日
 * @Time 19:06
 */

@FeignClient(value = "service-message", contextId = "RoomBannedClient")
@RequestMapping("/message-service")
public interface RoomBannedClient {
    /**
     * 通过 roomId 和 bannerId 获取一个 RoomBanned 对象
     * @param roomId
     * @param bannerId
     * @return data: RoomBanned
     */
    @PostMapping("get-room-banned-room-banner")
    ResultObject getRoomBannedByRoomIdAndBanner(
            @RequestParam(name = "roomId") String roomId,
            @RequestParam(name = "bannerId") String bannerId) ;

    /**
     * 通过roomId 获取 RoomBanned 对象集
     * @param roomId
     * @return items List<RoomBanned>
     */
    @PostMapping("get-room-banned-room")
    ResultObject getRoomBannedInRoom(
            @RequestParam(name = "roomId") String roomId) ;

    /**
     * 通过operatorId 获取 RoomBanned 对象集
     * @param operatorId
     * @return items List<RoomBanned>
     */
    @PostMapping("get-room-banned-operator")
    ResultObject getRoomBannedWithOperator(
            @RequestParam(name = "operatorId") String operatorId) ;

    /**
     * 通过bannerId 获取 RoomBanned 对象集
     * @param bannerId
     * @return items List<RoomBanned>
     */
    @PostMapping("get-room-banned-banner")
    ResultObject getRoomBannedWithBanner(
            @RequestParam(name = "bannerId") String bannerId) ;

    /**
     * 添加 RoomBanned
     * @param roomBanned
     * @return data RoomBanned
     */
    @PostMapping("add-room-banned")
    ResultObject addRoomBanned(
            @RequestBody RoomBanned roomBanned) ;

    /**
     * 通过RoomBanned对象三个主要数据列删除RoomBanned
     * @param roomBanned
     * @return data RoomBanned
     */
    @PostMapping("delete-room-banned")
    ResultObject deleteRoomBanned(
            @RequestBody RoomBanned roomBanned) ;

    /**
     * 通过roomId 和 bannerId 删除一个RoomBanned
     * @param roomId
     * @param bannerId
     * @return data RoomBanned
     */
    @PostMapping("delete-room-banned-room-banner")
    ResultObject deleteRoomBannedByRoomIdAndBannerId(
            @RequestParam(name = "roomId") String roomId,
            @RequestParam(name = "bannerId") String bannerId) ;

    /**
     * 通过 roomId 删除所有 RoomBanned
     * @param roomId
     * @return items List<RoomBanned>
     */
    @PostMapping("delete-room-banned-room")
    ResultObject deleteRoomBannedInRoom(
            @RequestParam(name = "roomId") String roomId) ;

}
